package br.slic.services.interfaces;

import java.util.List;

import javax.ejb.Local;

import br.slic.entidade.EntidadePersistente;
import br.slic.exception.ServiceException;

@Local
public interface GenericServiceLocal {

	@SuppressWarnings("rawtypes")
	<T> void remover(List<T> objetos, Class clazz) throws ServiceException;
	
	@SuppressWarnings("rawtypes")
	<T> void persistir(T objeto, Class clazz) throws ServiceException;

	@SuppressWarnings("rawtypes")
	<T extends EntidadePersistente> void salvar(T objeto, Class clazz) throws ServiceException;	
	
	@SuppressWarnings("rawtypes")
	<T> void atualizar(T objeto, Class clazz) throws ServiceException;	
	
	@SuppressWarnings("rawtypes")
	<T> T obterEntidade(Long id, Class clazz) throws ServiceException;
	
	@SuppressWarnings("rawtypes")
	<T> List<T> obterEntidades(Class clazz) throws ServiceException;
	
	@SuppressWarnings("rawtypes")
	<T> List<T> obterListaLazy(Object objeto, Class clazz, String relacionamento) throws ServiceException;
	
}
